package com.jy.api.payReq;

import com.jy.api.domain.Order;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class HuiFuMicroPayReq {
    private String termOrdId;

    private String memberId;

    private String ordAmt;

    private String authCode;

    private String apiVersion="3.0.0.2";

    private String goodsDesc;


    public HuiFuMicroPayReq(Order order, String authCode, String mchId) {
        this.termOrdId = order.getId();
        this.memberId = mchId;
        this.ordAmt = String.valueOf((int) Math.rint(order.getAmount() * 100));
        this.authCode = authCode;
    }


}
